import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import store from './store/store'
import { Provider } from 'react-redux';

import { BrowserRouter } from 'react-router-dom';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  // <React.StrictMode>
  // <BrowserRouter>
  <Provider store={store}>
    <App />
  </Provider>


  /* </BrowserRouter> */
  // </React.StrictMode>
);

//在react-redux上提供的方法,就不用store提供的方法
//store上有个subscribe方法,当store内部的值发生改变时,subscribe方法就会执行
// store.subscribe(()=>{
//   root.render(
//       <App />
//   );
// })
